package CreationMode.prototype.shallClone.demo1;

public class Realizetype implements Cloneable{

    public Realizetype() {
        System.out.println("构造了一个对象");
    }

    @Override
    protected Realizetype clone() {
        System.out.println("克隆了一个对象");
        try {
            return (Realizetype) super.clone();
        } catch (CloneNotSupportedException e) {
            e.printStackTrace();
            return null;
        }
    }
}
